import fetch from '@/utils/network/fetch'

const getVideos = (objc) => {
    fetch('/api/knowledge/video', objc)
}

const addVideo = (objc) => {
    fetch('/api/knowledge/video', objc)
}

const editVideo = (objc) => {
    fetch(`/api/knowledge/video/${objc.data.id}`, objc)
}

const removeVideo = (objc) => {
    fetch('/api/knowledge/video/deletion', objc)
}

const classVideo = (objc) => {
    fetch(`/api/classification?class_type=${objc.data.class_type}&build_tree=true`, objc)   
}

export default {
    getVideos,
    addVideo,
    editVideo,
    removeVideo,
    classVideo
}